import request from '@/utils/request'

export function signAppList(params) {
  return request({
    url: '/online/developer-admin/app/sign-list', params,
    method: 'GET'
  })
}
export function getAppVersionInfo(appId, appVersionId) {
  return request({
    url: `/online/developer-admin/app/${appId}/version/${appVersionId}`,
    method: 'GET'
  })
}
export function getAppInfoPage(params) {
  return request({
    url: '/online/developer-admin/app', params,
    method: 'GET'
  })
}
export function getAppVersionImage(appVersionId) {
  return request({
    url: `/online/developer-admin/app/version/${appVersionId}/images`,
    method: 'GET'
  })
}
export function getAppVersionPermission(appVersionId) {
  return request({
    url: `/online/developer-admin/app/version/${appVersionId}/permission`,
    method: 'GET'
  })
}
export function initialExamine(appVersionId, data) {
  return request({
    url: `/online/developer-admin/app/version/${appVersionId}/initial-examine`, data,
    method: 'POST'
  })
}
export function screenshotList(appId, params) {
  return request({
    url: `/online/developer-admin/app/${appId}/screenshot`, params,
    method: 'GET'
  })
}
export function getInitialExamine(params) {
  return request({
    url: `/online/developer-admin/app/initial-examine`, params,
    method: 'GET'
  })
}
export function getSysAppList() {
  return request({
    url: '/online/developer-admin/app/category-list',
    method: 'GET'
  })
}
export function getAppInfo(appId) {
  return request({
    url: `/online/developer-admin/app/${appId}`,
    method: 'GET'
  })
}
export function updateHighQualityStatus(appId, params) {
  return request({
    url: `/online/developer-admin/app/${appId}/high-quality`, data: params,
    method: 'POST'
  })
}
export function appVersionList(appId, params) {
  return request({
    url: `/online/developer-admin/app/${appId}/version`, params,
    method: 'GET'
  })
}
export function appRevisionList(appId, params) {
  return request({
    url: `/online/developer-admin/app/${appId}/revision`, params,
    method: 'GET'
  })
}
export function appDownloadList(appId, params) {
  return request({
    url: `/online/developer-admin/app/${appId}/download`, params,
    method: 'GET'
  })
}
export function examList(params) {
  return request({
    url: '/online/developer-admin/app/exam-list', params,
    method: 'GET'
  })
}
export function examListDetail(params) {
  return request({
    url: '/online/developer-admin/app/exam-list/detail', params,
    method: 'GET'
  })
}
export function examListRemark(params) {
  return request({
    url: '/online/developer-admin/app/exam-list/remark', data: params,
    method: 'POST'
  })
}
export function examListComplete(params) {
  return request({
    url: '/online/developer-admin/app/exam-list/complete', data: params,
    method: 'POST'
  })
}

export function appImageUpload(params) {
  return request({
    url: '/online/developer-admin/app/upload/screenshot', data: params,
    method: 'POST'
  })
}
export function suspendApp(appId, params) {
  return request({
    url: `/online/developer-admin/app/${appId}/suspend`, data: params,
    method: 'POST'
  })
}

export function uploadScreenshot(data) {
  return request({
    url: `/online/developer-admin/app/upload/screenshot`,
    method: 'POST',
    data
  })
}

export function appAppraiseList(appId, params) {
  return request({
    url: `/online/developer-admin/app/${appId}/appraise`, params,
    method: 'GET'
  })
}

/**
 * @desc 获取评分列表
 * appId:
 * appVersionId：
 */
export function getAppScores(appId, params) {
  return request({
    url: `/online/developer-admin/app/${appId}/scores`, params,
    method: 'GET'
  })
}
